import request from "@/api/request";
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";

/**
 * /meterRecord/create
 */
export function postMeterRecordCreate(params: PostMeterRecordCreateParams, input?: PostMeterRecordCreateInput, config?: AxiosRequestConfig) {
    const paramsInput = {
        siteId: params.siteId,
        currentData: params.currentData,
        date: params.date,
        remark: params.remark,
    };
    return request.post<DeepRequired<any>>(`/meterRecord/create`, input, {
        params: paramsInput,
        ...config,
    });
}

export interface PostMeterRecordCreateParams {
    siteId: number;
    currentData: number;
    date: string;
    remark?: string;
}

export interface PostMeterRecordCreateInput {
    file: File;
}
